#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;
const int N = 1e6 + 10;
int a[N], b[N], c[N];
int as, bs, cs;
void add(int a[], int b[], int c[])
{
    for (int i = 0; i < cs; i++)
    {
        c[i] += a[i] + b[i];
        c[i + 1] += c[i] / 10;
        c[i] %= 10;
    }
    if (c[cs])
    {
        cs++;
    }
}
int main()
{
    string s1, s2;
    cin >> s1 >> s2;
    as = s1.size();
    bs = s2.size();
    cs = max(as, bs);
    for (int i = 0; i < as; i++)
    {
        a[as - 1 - i] = s1[i] - '0';
    }
    for (int i = 0; i < bs; i++)
    {
        b[bs - 1 - i] = s2[i] - '0';
    }
    add(a, b, c);
    for (int i = cs - 1; i >= 0; i--)
    {
        cout << c[i];
    }
    return 0;
}